package com.ruyuan.eshop.common.framework.context.user;

import com.ruyuan.eshop.common.framework.security.model.Buyer;
import com.ruyuan.eshop.common.framework.security.model.Seller;
import org.springframework.stereotype.Component;

import java.util.UUID;

/**
 * 默认用户holder
 * @author pwd
 * @version 1.0
 */
@Component
public class DefaultUserHolder implements UserHolder {

    @Override
    public Seller getSeller() {
        Seller seller = new Seller();
        seller.setUid(100L);
        seller.setUuid(UUID.randomUUID().toString());
        seller.setUsername("seller001");

        seller.setSellerId(100L);
        seller.setSellerName("平台自营");
        seller.setSellerId(1);
        return seller;
    }

    @Override
    public Buyer getBuyer() {
        Buyer buyer = new Buyer();
        buyer.setUid(100L);
        buyer.setUuid(UUID.randomUUID().toString());
        buyer.setUsername("buy001");
        return buyer;
    }
}
